<div id="topic_detail">
	<div class="topic_title">{? $title ?}</div>

	<div class="topic">
	<div class="topic_info">
		Postd in {? $post_time|date_format:"%A, %B %e, %H:%M:%S, %Y" ?} and 
		viewed {? $view_count ?} times ,by {? $post_username ?}
	</div>
	<div class="topic_content">

	{?* 主题内容不允许为空,为空时为异常情况,但不能因此破坏用户界面 *?}
	{? if $content == '' ?}
		content is empty ?! what`s wrong ... 
	{? else ?}
		{? $content ?}
	{? /if ?}
	
	</div>

	</div>

	<!--replys-->
	<div class="reply_title">{? $reply_count ?} replys</div>
	
	{? if $reply_count > 0 && $replys ?}
	{?* 回复数为0时,不显示该部分 *?}
	
	{? foreach key=key item=item from=$replys ?}
		
		<div class="reply">
	
		{? foreach key=key item=item from=$item ?}

			{? if $key == 'content' ?}
				{? assign var=content value=$item ?}
			{? /if ?}

			{? if $key == 'reply_username' ?}
				{? assign var=reply_username value=$item ?}
			{? /if ?}
	
			{? if $key == 'reply_time' ?}
				{? assign var=reply_time value=$item ?}
			{? /if ?}

		{? /foreach ?}

			<div class="reply_info">
			Reply on {? $reply_time|date_format:"%A, %B %e, %H:%M:%S, %Y" ?} by {? $reply_username ?}
			</div>
	
			<div class="reply_content">
			{?* 回复内容不允许为空,为空时为异常情况,但不能因此破坏用户界面 *?}
			{? if $content == '' ?}
				content is empty ?! what`s wrong ... 
			{? else ?}
				{? $content ?}
			{? /if ?}
			</div>	

		</div>

	{? /foreach ?}

	{? /if ?}

	<form method="post" action="do_reply.php" name="reply" id="reply_form" onsubmit="on_submit();">
	<input type="hidden" name="topic_no" value="{? $topic_no ?}" />
	<div id="post_you_answer">
		<div class="title">You answer</div>

		{? include file="mod_WYSIWYG.tpl"?}
 
		<div class="submit"><input type="submit" value="Post It."/></div> 
	</div>
	</form>

</div>
